package TouristManagement;

/**
 * Interface definition : Site
 * 
 * @author OpenORB Compiler
 */
public abstract class SitePOA extends org.omg.PortableServer.Servant
        implements SiteOperations, org.omg.CORBA.portable.InvokeHandler
{
    public Site _this()
    {
        return SiteHelper.narrow(_this_object());
    }

    public Site _this(org.omg.CORBA.ORB orb)
    {
        return SiteHelper.narrow(_this_object(orb));
    }

    private static String [] _ids_list =
    {
        "IDL:TouristManagement/Site:1.0"
    };

    public String[] _all_interfaces(org.omg.PortableServer.POA poa, byte [] objectId)
    {
        return _ids_list;
    }

    private static final java.util.Map operationMap = new java.util.HashMap();

    static {
            operationMap.put("_get_idSite",
                    new Operation__get_idSite());
            operationMap.put("checkIn",
                    new Operation_checkIn());
            operationMap.put("checkOut",
                    new Operation_checkOut());
            operationMap.put("consultLocalStat",
                    new Operation_consultLocalStat());
            operationMap.put("getAdviceAverage",
                    new Operation_getAdviceAverage());
            operationMap.put("getAffluenceQuotidienne",
                    new Operation_getAffluenceQuotidienne());
            operationMap.put("getCoordsGPS",
                    new Operation_getCoordsGPS());
            operationMap.put("getHoraireFermeture",
                    new Operation_getHoraireFermeture());
            operationMap.put("getHoraireOuverture",
                    new Operation_getHoraireOuverture());
            operationMap.put("getIdSite",
                    new Operation_getIdSite());
            operationMap.put("getNbVisiteurActuel",
                    new Operation_getNbVisiteurActuel());
            operationMap.put("getNbVisiteurMaximal",
                    new Operation_getNbVisiteurMaximal());
            operationMap.put("getNomSite",
                    new Operation_getNomSite());
            operationMap.put("getdurationAverage",
                    new Operation_getdurationAverage());
            operationMap.put("getdurationVisitMax",
                    new Operation_getdurationVisitMax());
            operationMap.put("getdurationVisitMin",
                    new Operation_getdurationVisitMin());
            operationMap.put("verifyVisit",
                    new Operation_verifyVisit());
    }

    public final org.omg.CORBA.portable.OutputStream _invoke(final String opName,
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler)
    {

        final AbstractOperation operation = (AbstractOperation)operationMap.get(opName);

        if (null == operation) {
            throw new org.omg.CORBA.BAD_OPERATION(opName);
        }

        return operation.invoke(this, _is, handler);
    }

    // helper methods
    private org.omg.CORBA.portable.OutputStream _invoke__get_idSite(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;
        short arg = idSite();
        _output = handler.createReply();
        _output.write_short(arg);
        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke_checkIn(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;
        short arg0_in = _is.read_short();

        try
        {
            short _arg_result = checkIn(arg0_in);

            _output = handler.createReply();
            _output.write_short(_arg_result);

        }
        catch (TouristManagement.CheckInNotValid _exception)
        {
            _output = handler.createExceptionReply();
            TouristManagement.CheckInNotValidHelper.write(_output,_exception);
        }
        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke_checkOut(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;
        short arg0_in = _is.read_short();

        TouristManagement.VisitManagement _arg_result = checkOut(arg0_in);

        _output = handler.createReply();
        TouristManagement.VisitManagementHelper.write(_output,_arg_result);

        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke_consultLocalStat(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;

        TouristManagement.LocalStat _arg_result = consultLocalStat();

        _output = handler.createReply();
        TouristManagement.LocalStatHelper.write(_output,_arg_result);

        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke_getAdviceAverage(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;

        TouristManagement.Advice _arg_result = getAdviceAverage();

        _output = handler.createReply();
        TouristManagement.AdviceHelper.write(_output,_arg_result);

        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke_verifyVisit(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;
        short arg0_in = _is.read_short();

        boolean _arg_result = verifyVisit(arg0_in);

        _output = handler.createReply();
        _output.write_boolean(_arg_result);

        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke_getIdSite(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;

        short[] _arg_result = getIdSite();

        _output = handler.createReply();
        TouristManagement.ListShortHelper.write(_output,_arg_result);

        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke_getHoraireOuverture(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;

        TouristManagement.Hours _arg_result = getHoraireOuverture();

        _output = handler.createReply();
        TouristManagement.HoursHelper.write(_output,_arg_result);

        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke_getHoraireFermeture(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;

        TouristManagement.Hours _arg_result = getHoraireFermeture();

        _output = handler.createReply();
        TouristManagement.HoursHelper.write(_output,_arg_result);

        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke_getNbVisiteurActuel(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;

        short _arg_result = getNbVisiteurActuel();

        _output = handler.createReply();
        _output.write_short(_arg_result);

        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke_getNbVisiteurMaximal(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;

        short _arg_result = getNbVisiteurMaximal();

        _output = handler.createReply();
        _output.write_short(_arg_result);

        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke_getdurationAverage(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;

        short _arg_result = getdurationAverage();

        _output = handler.createReply();
        _output.write_short(_arg_result);

        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke_getdurationVisitMax(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;

        short _arg_result = getdurationVisitMax();

        _output = handler.createReply();
        _output.write_short(_arg_result);

        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke_getdurationVisitMin(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;

        short _arg_result = getdurationVisitMin();

        _output = handler.createReply();
        _output.write_short(_arg_result);

        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke_getNomSite(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;

        String _arg_result = getNomSite();

        _output = handler.createReply();
        _output.write_string(_arg_result);

        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke_getCoordsGPS(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;

        TouristManagement.CoordsGPS _arg_result = getCoordsGPS();

        _output = handler.createReply();
        TouristManagement.CoordsGPSHelper.write(_output,_arg_result);

        return _output;
    }

    private org.omg.CORBA.portable.OutputStream _invoke_getAffluenceQuotidienne(
            final org.omg.CORBA.portable.InputStream _is,
            final org.omg.CORBA.portable.ResponseHandler handler) {
        org.omg.CORBA.portable.OutputStream _output;

        short _arg_result = getAffluenceQuotidienne();

        _output = handler.createReply();
        _output.write_short(_arg_result);

        return _output;
    }

    // operation classes
    private abstract static class AbstractOperation {
        protected abstract org.omg.CORBA.portable.OutputStream invoke(
                SitePOA target,
                org.omg.CORBA.portable.InputStream _is,
                org.omg.CORBA.portable.ResponseHandler handler);
    }

    private static final class Operation__get_idSite extends AbstractOperation
    {
        protected org.omg.CORBA.portable.OutputStream invoke(
                final SitePOA target,
                final org.omg.CORBA.portable.InputStream _is,
                final org.omg.CORBA.portable.ResponseHandler handler) {
            return target._invoke__get_idSite(_is, handler);
        }
    }

    private static final class Operation_checkIn extends AbstractOperation
    {
        protected org.omg.CORBA.portable.OutputStream invoke(
                final SitePOA target,
                final org.omg.CORBA.portable.InputStream _is,
                final org.omg.CORBA.portable.ResponseHandler handler) {
            return target._invoke_checkIn(_is, handler);
        }
    }

    private static final class Operation_checkOut extends AbstractOperation
    {
        protected org.omg.CORBA.portable.OutputStream invoke(
                final SitePOA target,
                final org.omg.CORBA.portable.InputStream _is,
                final org.omg.CORBA.portable.ResponseHandler handler) {
            return target._invoke_checkOut(_is, handler);
        }
    }

    private static final class Operation_consultLocalStat extends AbstractOperation
    {
        protected org.omg.CORBA.portable.OutputStream invoke(
                final SitePOA target,
                final org.omg.CORBA.portable.InputStream _is,
                final org.omg.CORBA.portable.ResponseHandler handler) {
            return target._invoke_consultLocalStat(_is, handler);
        }
    }

    private static final class Operation_getAdviceAverage extends AbstractOperation
    {
        protected org.omg.CORBA.portable.OutputStream invoke(
                final SitePOA target,
                final org.omg.CORBA.portable.InputStream _is,
                final org.omg.CORBA.portable.ResponseHandler handler) {
            return target._invoke_getAdviceAverage(_is, handler);
        }
    }

    private static final class Operation_verifyVisit extends AbstractOperation
    {
        protected org.omg.CORBA.portable.OutputStream invoke(
                final SitePOA target,
                final org.omg.CORBA.portable.InputStream _is,
                final org.omg.CORBA.portable.ResponseHandler handler) {
            return target._invoke_verifyVisit(_is, handler);
        }
    }

    private static final class Operation_getIdSite extends AbstractOperation
    {
        protected org.omg.CORBA.portable.OutputStream invoke(
                final SitePOA target,
                final org.omg.CORBA.portable.InputStream _is,
                final org.omg.CORBA.portable.ResponseHandler handler) {
            return target._invoke_getIdSite(_is, handler);
        }
    }

    private static final class Operation_getHoraireOuverture extends AbstractOperation
    {
        protected org.omg.CORBA.portable.OutputStream invoke(
                final SitePOA target,
                final org.omg.CORBA.portable.InputStream _is,
                final org.omg.CORBA.portable.ResponseHandler handler) {
            return target._invoke_getHoraireOuverture(_is, handler);
        }
    }

    private static final class Operation_getHoraireFermeture extends AbstractOperation
    {
        protected org.omg.CORBA.portable.OutputStream invoke(
                final SitePOA target,
                final org.omg.CORBA.portable.InputStream _is,
                final org.omg.CORBA.portable.ResponseHandler handler) {
            return target._invoke_getHoraireFermeture(_is, handler);
        }
    }

    private static final class Operation_getNbVisiteurActuel extends AbstractOperation
    {
        protected org.omg.CORBA.portable.OutputStream invoke(
                final SitePOA target,
                final org.omg.CORBA.portable.InputStream _is,
                final org.omg.CORBA.portable.ResponseHandler handler) {
            return target._invoke_getNbVisiteurActuel(_is, handler);
        }
    }

    private static final class Operation_getNbVisiteurMaximal extends AbstractOperation
    {
        protected org.omg.CORBA.portable.OutputStream invoke(
                final SitePOA target,
                final org.omg.CORBA.portable.InputStream _is,
                final org.omg.CORBA.portable.ResponseHandler handler) {
            return target._invoke_getNbVisiteurMaximal(_is, handler);
        }
    }

    private static final class Operation_getdurationAverage extends AbstractOperation
    {
        protected org.omg.CORBA.portable.OutputStream invoke(
                final SitePOA target,
                final org.omg.CORBA.portable.InputStream _is,
                final org.omg.CORBA.portable.ResponseHandler handler) {
            return target._invoke_getdurationAverage(_is, handler);
        }
    }

    private static final class Operation_getdurationVisitMax extends AbstractOperation
    {
        protected org.omg.CORBA.portable.OutputStream invoke(
                final SitePOA target,
                final org.omg.CORBA.portable.InputStream _is,
                final org.omg.CORBA.portable.ResponseHandler handler) {
            return target._invoke_getdurationVisitMax(_is, handler);
        }
    }

    private static final class Operation_getdurationVisitMin extends AbstractOperation
    {
        protected org.omg.CORBA.portable.OutputStream invoke(
                final SitePOA target,
                final org.omg.CORBA.portable.InputStream _is,
                final org.omg.CORBA.portable.ResponseHandler handler) {
            return target._invoke_getdurationVisitMin(_is, handler);
        }
    }

    private static final class Operation_getNomSite extends AbstractOperation
    {
        protected org.omg.CORBA.portable.OutputStream invoke(
                final SitePOA target,
                final org.omg.CORBA.portable.InputStream _is,
                final org.omg.CORBA.portable.ResponseHandler handler) {
            return target._invoke_getNomSite(_is, handler);
        }
    }

    private static final class Operation_getCoordsGPS extends AbstractOperation
    {
        protected org.omg.CORBA.portable.OutputStream invoke(
                final SitePOA target,
                final org.omg.CORBA.portable.InputStream _is,
                final org.omg.CORBA.portable.ResponseHandler handler) {
            return target._invoke_getCoordsGPS(_is, handler);
        }
    }

    private static final class Operation_getAffluenceQuotidienne extends AbstractOperation
    {
        protected org.omg.CORBA.portable.OutputStream invoke(
                final SitePOA target,
                final org.omg.CORBA.portable.InputStream _is,
                final org.omg.CORBA.portable.ResponseHandler handler) {
            return target._invoke_getAffluenceQuotidienne(_is, handler);
        }
    }

}
